<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui"
      template="/layoutsFO/creerCompteLayout.xhtml"> 
	
	<ui:define name="body">
		<h:form>
			<p:panel id="panel" header="Inscription" style="margin-bottom:10px;float:left;">
				<h:panelGrid>
					<h:outputLabel for="Nom" value="Nom : " />
					<p:inputText id="Nom" value="#{mbCreerCompte.compteClient.nom}" />
					<h:outputLabel for="Prenom" value="Prénom : " />
					<p:inputText id="Prenom"
						value="#{mbCreerCompte.compteClient.prenom}" />
					<h:outputLabel for="email1" value="Email : " />
					<p:inputText id="email1" value="#{mbCreerCompte.mail1}"
					 label="email1" />
					<h:outputLabel for="email2" value="Confirmer email : *" />
					<p:inputText id="email2" value="#{mbCreerCompte.mail2}"
						label="email2" />
					<h:outputLabel value="Mot de passe 1 : " />
					<p:password id="pwd1" value="#{mbCreerCompte.mdp1}" />
					<h:outputLabel value="Mot de passe 2 : " />
					<p:password id="pwd2" value="#{mbCreerCompte.mdp2}" />
					<h:outputLabel value="Téléphone : " />
					<p:inputMask value="#{mbCreerCompte.compteClient.tel}"
						mask="99-99-99-99-99" />
				</h:panelGrid>
			</p:panel>
			<p:panel id="panelAdresse" toggleable="true" header="Adresse de facturation" toggleSpeed="1" collapsed="true" styleClass="panelCreerCompte">
			    <h:panelGrid>
	                 <h:outputLabel value="Adresse 1: " />
	                 <p:inputText
	                     value="#{mbCreerCompte.adresse.adresse1}"
	                     name="Adresse1" />
	                 <h:outputLabel value="Adresse 2: " />
	                 <p:inputText value="#{mbCreerCompte.adresse.adresse2}" name="Adresse2" />
	                 <h:outputLabel value="Code postal: " />
	                 <p:inputText value="#{mbCreerCompte.cp}">
	                     <p:ajax event="keyup" update="listeVille"
	                         listener="#{mbCreerCompte.villeParCP}" />
	                 </p:inputText>
	                 <h:outputLabel value="Ville: " />
	                 <p:selectOneMenu id="listeVille" value="#{mbCreerCompte.ville}" styleClass="choixVille" disabled="#{!mbCreerCompte.listeVillesEstRemplie}">
	                     <f:selectItem itemLabel="" itemValue=""  />
	                     <f:selectItems value="#{mbCreerCompte.listVille}" />
	                 </p:selectOneMenu>
	              </h:panelGrid>
             </p:panel>
			<p:commandButton value="S'enregistrer"
				action="#{mbCreerCompte.creerCompte }" update=":general_growl_form:general_growl,:panelConnexion" styleClass="boutonAjoutClient" />
		</h:form>
	</ui:define>

</ui:composition>






